/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


/*************************************************************************
 *\author: starlove
 *************************************************************************/
#ifndef __CC_PYTHON_IMPORT_O_IMAGE__
#define __CC_PYTHON_IMPORT_O_IMAGE__

#include <cocos2d.h>
#include "python_object_nodeobjects.h"

NS_CCPY_BEGIN
	class CPyImage : public CPyCCObject
	{
	PYCLASS_DEF_INTERFACE(CPyImage)
	public:
		PYCLASS_METHOD_KW_DEF(CPyImage, initWithImageFile);
		PYCLASS_METHOD_KW_DEF(CPyImage, initWithImageFileThreadSafe);
		PYCLASS_METHOD_KW_DEF(CPyImage, initWithImageData);
		PYCLASS_METHOD_KW_DEF(CPyImage, initWithString);
		PYCLASS_METHOD_KW_DEF(CPyImage, saveToFile);

		PYCLASS_GET_DEF(CPyImage, _Data);
		PYCLASS_GET_DEF(CPyImage, _hasAlpha);
		PYCLASS_GET_DEF(CPyImage, _isPremultipliedAlpha);
		PYCLASS_GET_DEF(CPyImage, _Width);
		PYCLASS_GET_DEF(CPyImage, _Height);
		PYCLASS_GET_DEF(CPyImage, _BitsPerComponent);

		void setRaw(){ setCCObject(&m_raw); }
	private:
		cocos2d::CCImage m_raw;
	};

NS_CCPY_END

#endif